package com.hxs.learn.entity.core;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.Alias;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author kevin
 * @version 1.0
 * @className Bill
 * @description
 * @date 2018/3/29 14:11
 **/
@Data
@Alias("bill")
@TableName(value = "sys_bill")
@EqualsAndHashCode(callSuper = false)
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField(value = "code", strategy = FieldStrategy.NOT_EMPTY)
    @NotNull(message = "主键字段描述不能为空!")
    private String code;

    @TableField("prefix")
    private String prefix;

    @TableField("dateFormat")
    private String dateFormat;

    @TableField(value = "num", strategy = FieldStrategy.NOT_EMPTY)
    @NotNull(message = "长度值不能为空!")
    private Integer num;
}
